package com.industrial.premu.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.industrial.common.core.web.domain.AjaxResult;
import com.industrial.premu.domain.PreMuBenefitEvaluation;
import com.industrial.premu.domain.PreMuBenefitEvaluation20250520;
import com.industrial.premu.domain.PreMuBenefitEvaluationLog;
import com.industrial.premu.domain.vo.ExternalVo;
import com.industrial.premu.dto.PreMuAreaTreeDto;
import com.industrial.premu.dto.PreMuBenefitEvaluationDto;
import com.industrial.premu.dto.PreMuChartsDto;
import com.industrial.premu.vo.*;
import com.industrial.system.api.domain.EmEnterpriseInformationCollection;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletResponse;

/**
 * 亩产效益评价Service接口
 * 
 * @author ZHOU_S
 * @date 2024-01-25
 */
public interface IPreMuBenefitEvaluationService 
{
    /**
     * 查询亩产效益评价
     * 
     * @param id 亩产效益评价主键
     * @return 亩产效益评价
     */
    public PreMuBenefitEvaluation selectPreMuBenefitEvaluationById(String id);

    /**
     * 查询亩产效益评价列表
     * 
     * @param preMuBenefitEvaluation 亩产效益评价
     * @return 亩产效益评价集合
     */
    public List<PreMuBenefitEvaluation> selectPreMuBenefitEvaluationList(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuBenefitEvaluation20250520> selectPreMuBenefitEvaluationList2025(PreMuBenefitEvaluation preMuBenefitEvaluation);
    /**
     * 新增亩产效益评价
     * 
     * @param preMuBenefitEvaluation 亩产效益评价
     * @return 结果
     */
    public int insertPreMuBenefitEvaluation(PreMuBenefitEvaluation preMuBenefitEvaluation);

    /**
     * 修改亩产效益评价
     * 
     * @param preMuBenefitEvaluation 亩产效益评价
     * @return 结果
     */
    public int updatePreMuBenefitEvaluation(PreMuBenefitEvaluation preMuBenefitEvaluation);

    /**
     * 批量删除亩产效益评价
     * 
     * @param ids 需要删除的亩产效益评价主键集合
     * @return 结果
     */
    public int deletePreMuBenefitEvaluationByIds(String[] ids);

    /**
     * 删除亩产效益评价信息
     * 
     * @param id 亩产效益评价主键
     * @return 结果
     */
    public int deletePreMuBenefitEvaluationById(String id);

    PreMuBenefitEvaluationVo getById(String id);

    /**
     * <p>
     *     一键试算<br/>
     *     获取试用统计信息
     * </p>
     * @param preMuBenefitEvaluation companyType 企业类型
     * @return 平均值 中位数 区域指标
     */
    AjaxResult getTrialStatistics(PreMuBenefitEvaluationDto preMuBenefitEvaluation);


    int  editAll(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuBenefitEvaluationVo> getExportList(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuBenefitEvaluation20250520Vo> getExportList2025(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuIndustryBenefitEvaluationVo> getExportListGroupIndustry(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuIndustryBenefitEvaluationVo20250520> getExportListGroupIndustry2025(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuLevelBenefitEvaluationVo> getExportListGroupLevel(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuLevelBenefitEvaluationVo20250520> getExportListGroupLevel2025(PreMuBenefitEvaluation preMuBenefitEvaluation);
    /**
     * <p>
     *     一键试算
     * </p>
     * <p>
     *      获取企业的单项指标值
     * </p>
     * @param preMuBenefitEvaluation
     * @return
     */
    com.github.pagehelper.Page<Map<String,String>> getEnterSingleIndexScore(PreMuBenefitEvaluationDto preMuBenefitEvaluation);



    PreMuScheduleManagementVo  groupArea(PreMuBenefitEvaluation preMuBenefitEvaluation);

    List<PreMuBenefitEvaluation> getVillageCount(String countyCode);

    List<PreMuBenefitEvaluation> getCountyCount(String cityCode);

    List<PreMuChartsVo>  getPj(PreMuAreaTreeDto areaTreeDto);


    /**
     * 试算应用
     * @param params
     * @return
     */
    AjaxResult adhibition(PreMuBenefitEvaluationDto params);

    AjaxResult evaluate(String year, String companyType, String district, String park, String industryType);
    List<PreMuChartsVo> groupDimensionLevel(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupProportionLevel(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupDimensionArea(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupIndexByCity(PreMuChartsDto preMuChartsDto);

    PreMuChartsVo getAvgNum(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupIndexByIndustry(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupAreaIndustry(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupCompanyByIndustry(PreMuChartsDto preMuChartsDto);


    List<PreMuChartsVo> groupByArea(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupByAreaIndustry(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> groupEconomyByYears(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> economyGruopArea(PreMuChartsDto preMuChartsDto);

    List<PreMuChartsVo> economyGruopIndustry(PreMuChartsDto preMuChartsDto);

    PreMuGradingRatioVo getGradingRatioVo(PreMuBenefitEvaluation preMuBenefitEvaluation);

    void updateStatusByIds(@Param("idList") List<String> idList);

    void updateVerifyByIds(@Param("idList") List<String> idList);

    /**
     * 取消评级
     * @param chartsDto
     */
    AjaxResult grade(PreMuChartsDto chartsDto);

    /**
     * 升档降档
     * @param params
     * @return
     */
    AjaxResult changeLevel(Map<String, String> params);

    List<PreMuBenefitEvaluationLog> queryLevelLog(String companyId,String years);


    List<PreMuChartsVo> groupCounty(PreMuChartsDto preMuChartsDto);


    PreMuProgressAnalysisVo getCountyPingJ(PreMuBenefitEvaluation preMuBenefitEvaluation );


   /* List<PreMuAreaVo> groupAreas();*/

    void getExcel(HttpServletResponse response);

    /**
     * 查询升档降档后的详情信息
     * @param id
     * @return
     */
    PreMuBenefitEvaluationLog queryUpDownDetailInfo(String id);

    /**
     * <p>
     *     查询白名单的基础数据<br/>
     *     数据来源亩产
     * </p>
     * @return
     */
    EmEnterpriseInformationCollection queryWhiteCompanyInfoById(String id);

    List<PreMuBenefitEvaluation> selectPreMuBenefitEvaluationHsList(PreMuBenefitEvaluation preMuBenefitEvaluation);

    int updateSores(PreMuBenefitEvaluation preMuBenefitEvaluation);

    void getPreMuBenefitEvaluationExcel(HttpServletResponse response, List<PreMuBenefitEvaluation> list,String companyType);

    List<ExternalVo> pageList();

    AjaxResult existDifferentCalType(PreMuBenefitEvaluationDto preMuBenefitEvaluation);


}
